compile_order=gcc
final_exe=bar 
source_list=main.o bar.o

$(final_exe):$(source_list)
	$(compile_order) $^ -o $@
%.o:%.c
	$(compile_order) -c $<

.PHONY:clean
clean:
	rm -rf $(source_list) $(final_exe) 
